define(['common/js/service/boss-common-service-0.1'],
    function() {
        serviceModule.factory("BossWorkBenchService", function ($window, $http, $q, CommonRestService) {
            return {
                //获取订单日志
                getOrderLogList: function (param) {
                
                    return CommonRestService.query("/common/log/findLogList", param);
                },

                //获取当前日志详细
                searchOneLogDetail : function(param){
                    console.log("searchOneLogDetail...")
                    return CommonRestService.query("/common/log/findLogDetail",param)
                },
                getPermission: function () {
                    return CommonRestService.query("/common/workbench/getPermission");
                },
            	getUnreadBulletin: function (params) {
                    return CommonRestService.query("/common/workbench/getUnreadBulletin");
                },
                getProjectCount: function (params) {
                    return CommonRestService.query("/common/workbench/getProjectCount");
                },
                getTodayAdvance:function(params){
                    return CommonRestService.query("/common/workbench/getTodayAdvance");
                },
                getAllAdvance: function(params){
                    return CommonRestService.query("/common/workbench/getAllAdvance");
                },
                getAllDiscount: function(){
                    return CommonRestService.query("/common/workbench/getAllDiscount");
                },
                getBalanceMoney: function(){
                    return CommonRestService.query("/common/workbench/getBalanceMoney");
                },
                getRefundOrder: function(){
                    return CommonRestService.query("/common/workbench/getRefundOrder");
                },
                getPrintOrder: function(){
                    return CommonRestService.query("/common/workbench/getPrintOrder");
                },
                //查询座位显示
    			queryAdvanceOrderSelected:function(requestParams){
    				return CommonRestService.query("/rest/order/advance/queryAdvanceOrderSelected",requestParams);
    			},
    			//取消预订单
    			cancel:function(requestParams){
    				return CommonRestService.query("/rest/order/advance/cancel",requestParams);
    			},
    			//查询预订单详情
    			queryAdvanceOrderInfo:function(requestParams){
    				return CommonRestService.query("/rest/order/advance/queryAdvanceOrderInfo",requestParams);
    			},
    			//查询详情展开
    			findGoodGoodShowVOByGoodId:function(requestParams){
    				return CommonRestService.query("/rest/order/advance/findGoodGoodShowVOByGoodId",requestParams);
    			},
                //校验商品是否有权限
                checkAdvanceOrderBeforeAction:function(requestParams){
                    return CommonRestService.query("/rest/order/advance/checkAdvanceOrderBeforeAction",requestParams);
                },
                //预订提醒关闭
                updateAlertState:function(requestParams){
                    return CommonRestService.query("/rest/order/advance/updateAlertState",requestParams);
                },
                //退回父预订单
                backAdvanceOrder:function(requestParams){
                    return CommonRestService.query("/rest/order/advance/backAdvanceOrder",requestParams);
                },
                //查询调整预订时间项
                queryAdvanceOrderUpdate:function(requestParams){
                    return CommonRestService.query("/rest/order/advance/queryAdvanceOrderUpdate",requestParams);
                },
                //调整预订时间
                updateAdvanceOrder:function(requestParams){
                    return CommonRestService.query("/rest/order/advance/updateAdvanceOrder",requestParams);
                },
    			/***
                 * 查询订单详情信息
                 */
                findOrderDetailInfo: function (requestParams) {
                    return CommonRestService.query('/boss/formalorder/findOrderDetailInfo', requestParams);
                },
                /***
                 * 查询订单商品信息
                 */
                findOrderGoodsInfo: function (requestParams) {
                    return CommonRestService.query('/boss/formalorder/findOrderGoodsInfo', requestParams);
                },
                /**
                 * 查询订单支付详情
                 */
                findOrderPayDetailInfo: function (requestParams) {
                    return CommonRestService.query('/boss/formalorder/findOrderPayDetailInfo', requestParams)
                },
                
                /***
	       		  * 退单审核操作
	       		  */
	       		 checkOrderState:function(params){
	       			 return CommonRestService.query('/boss/refundorder/checkOrderState',params);
	       		 },
       		 
       		 	//RecordOrderService
       		 //重打单详情
             findRecodeDetailInfo: function (requestParams) {
                 return CommonRestService.query("/rest/order/recode/findRecodeDetailInfo", requestParams);
             },
           //重打单审核
             recodeCheck: function (requestParams) {
                 return CommonRestService.query("/rest/order/recode/checkRecodeOrder", requestParams);
             },
             
             //discountCenterService
             /***
 			 * 查询优惠详情
 			 */
 			findDiscountDetail:function(params){
 				return CommonRestService.query('/common/workbench/findDiscountDetail',params)
 			},
            };
        });
    });